#pragma once

#include <QList>
#include <QString>

#include "../data/datainterface.h"

namespace PBVP {
	class FilePluginInterface;

	class FileExtensionManager {
	public:
		/// <summary>
		/// 
		/// </summary>
		FileExtensionManager();
		/// <summary>
		/// 
		/// </summary>
		virtual ~FileExtensionManager();
		/// <summary>
		/// 
		/// </summary>
		/// <param name="pFilePlugin"></param>
		void registerPlugin(FilePluginInterface* pFilePlugin);

		/// <summary>
		/// List the file extensions supported
		/// </summary>
		/// <returns>QString</returns>
		QString filter();

		/// <summary>
		/// Get the extension supported for a given DataSet Type
		/// </summary>
		/// <param name="type"></param>
		/// <returns>QString</returns>
		QString filter(DataSetType type);

		/// <summary>
		/// Find the FilePlugin that supports a given file name
		/// </summary>
		/// <param name="fname"></param>
		/// <returns>FilePluginInterface*</returns>
		FilePluginInterface* getSupportedPlugin(const QString &fname);

	private:
		///
		QList<FilePluginInterface*> m_GeometryPluginList;
		///
		QList<FilePluginInterface*> m_VolumePluginList;
		///
		QList<FilePluginInterface*> m_ProteinPluginList;
	};

}